<?php

namespace app\supply\controller;
use app\common\controller\PCBase;
use app\supply\logic\SupplySaleLogic;
use Throwable;
use  think\App;
class SupplySale extends PCBase
{

    /**
     * @desc    供应商销量统计列表
     * @date    2024/7/26
     * @author  luckyXiong
     */
    public function index(){
        $params     = $this->request->post();
        $tel        = $this->getAdminTel();
        $groupId    = $this->getAdminGroupId();
        $params['tel']     = $tel;
        $params['groupId'] = $groupId;
        return  (new SupplySaleLogic())->get_list($params);
    }


    /**
     * @desc    获取供应商销量子集
     * @date    2024/7/26
     * @author  luckyXiong
     */
    public function getInfo(){
        $params     = $this->request->post();
        return  (new SupplySaleLogic())->get_info($params);
    }


    /**
     * @desc    获取供应商销量子集
     * @date    2024/7/26
     * @author  luckyXiong
     */
    public function getStock(){
        $params     = $this->request->post();
        $tel        = $this->getAdminTel();
        $groupId    = $this->getAdminGroupId();
        $params['tel']     = $tel;
        $params['groupId'] = $groupId;
        return  (new SupplySaleLogic())->getStock($params);
    }


    /**
     * @desc    获取当天的spu详情数据
     * @date    2025/6/21
     * @author  luckyXiong
     */
    public function getSpuStock(){
        $params     = $this->request->post();
        $res        = (new SupplySaleLogic())->getSpuStock($params);
        return      $this->jsonMessage(200,true,'获取成功',$res);
    }
    
    /**
     * @desc    获取当天的spu详情数据---缺货
     * @date    2025/6/21
     * @author  zhangheng
     */
    public function getSpuStockBeOut(){
        $params     = $this->request->post();
        $res        = (new SupplySaleLogic())->getSpuStockBeOut($params);
        return      $this->jsonMessage(200,true,'获取成功',$res);
    }


    /**
     * @desc    daochu
     * @date    2025/6/25
     * @author  zhangheng
     */
    public function export_need_info(){
        $params     = $this->request->post();
        return (new SupplySaleLogic())->export_need_info($params);

    }







}